#include "neiderra/core/Base.h"
#include "neiderra/core/Core.h"
#include "neiderra/core/iSubsystem.h"

#include "neiderra/gui/Window.h"
#include "neiderra/gui/iGraphicsSubsystem.h"

#include <string>

using namespace neiderra;
using namespace neiderra::core;
using namespace neiderra::gui;

#include <boost/python.hpp>
using namespace boost::python;

BOOST_PYTHON_MODULE(neigine)
{
	// todo: packages - namespaces

	// CORE

	class_<Core>("Core")
		.def("powerup", &Core::powerup)
		.def("shutdown", &Core::shutdown)
		.def("isWorking", &Core::isWorking)
		.def("run", &Core::run)
		.def("getGraphicsSubsystem", &Core::getGraphicsSubsystem, return_internal_reference<>())
	;

    class_<Base>("Base", init<Core*>())
		.def("setCore", &Base::setCore)
		.def("getCore", &Base::getCore, return_internal_reference<>())
		.def("toString", &Base::toString)
	;

	class_<iAlive, bases<Base> >("iAlive", init<Core*>())
		.def("update", &iAlive::update)
	;

	class_<iSubsystem, bases<iAlive> >("iSubsystem", init<Core*>())
	;

	// GUI

	// todo: bases 
	class_<iGraphicsSubsystem, bases<iSubsystem> >("iGraphicsSubsystem", init<Core*>())
		.def("createSystemWindow", &iGraphicsSubsystem::createSystemWindow, return_value_policy<manage_new_object>())
	;

	class_<GUIWindow>("GUIWindow", init<Core*>())
		.def("show", &GUIWindow::show)
	;
}

